def solution(a: int, b: int) -> int:
    # write code here
    result = []

    for i in range(len(str(a))):
        list_a = list(str(a))
        list_a.insert(i, str(b))
        result.append("".join(list_a))

    result.append(str(a) + str(b))

    result = [int(num) for num in result]

    return max(result)


if __name__ == '__main__':
    print(solution(76543, 4) == 765443)
    print(solution(1, 0) == 10)
    print(solution(44, 5) == 544)
    print(solution(666, 6) == 6666)
    print(solution(17, 1) == 171)